<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <meta http-equiv="X-UA-Compatible" content="ie=edge">
    <title>Document</title>
    <style>
        .div1 {
            /* float: left; */
            height: 400px;
            width: 400px;
            background-color: black;
        }
        .div2 {
            float: right;
            height: 400px;
            width: 400px;
            background-color: black;
        }
        .div3{
            overflow: hidden;
        }
    </style>
</head>
<body>
    <div class="div3">
        <div class="div1"> </div>
        <div class="div2"> </div>
    </div>
</body>
</html>